import React, { useEffect } from 'react'
import { Layout } from 'antd';
import SideMenu from '@components/SandBox/SideMenu'
import TopHead from '@components/SandBox/TopHead'
import PremissionRoute from './PremissionRoute/index'
import './layout.css'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

export default function SandBox() {
  NProgress.start()
  useEffect(() => {
    NProgress.done()
  })
  return (
    <Layout>
      {/* 左侧侧边导航 */}
      <SideMenu />
      {/* 右侧内容区域 */}
      <Layout className="site-layout">
        {/* 内容头部 */}
        <TopHead />
        {/* 主体内容 */}
        <Layout.Content className="site-layout-background" style={{ margin: '24px 16px', padding: 24, minHeight: 280 }} >
          <PremissionRoute />
        </Layout.Content>
      </Layout>
    </Layout>
  )
}
